package com.app.controller;

import com.app.bean.dto.User;
import com.app.common.BaseVo;
import com.app.service.IUserFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试
 *
 * @autor xiaoyu.fang
 * @date 2019/12/12 13:53
 */
@RestController
@RequestMapping("/biz")
public class BussinessController {

    @Autowired
    private IUserFeignService userFeignService;

    @GetMapping("/user/{id}/detail")
    public BaseVo getUserById(@PathVariable("id") String id) {
        User user = userFeignService.getUserById(id);
        return new BaseVo(user);
    }
}
